﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Navigation;
using BotvaBot.Client.WPF;

namespace BotvaBot.RichUI
{
    /// <summary>
    /// Interaction logic for SimpleCommandsForm.xaml
    /// </summary>
    public partial class SimpleCommandsForm : Window
    {
        public SimpleCommandsFormDataModel DataModel { get; set; }
        
        public SimpleCommandsForm()
        {
            DataModel = new SimpleCommandsFormDataModel();

            InitializeComponent();

            DataContext = DataModel;
        }

        void ExecuteCommandQuery(object sender, RequestNavigateEventArgs e)
        {
            DataModel.Clear();

            SimpleCommandsFormDataModel status = new SimpleCommandsFormDataModel()
            {
                Url = e.Uri.ToString(),
                Method = e.Uri.ToString(),
                GET = e.Uri.ToString(),
                POST = e.Uri.ToString(),
                Headers = e.Uri.ToString(),
                InputCookies = e.Uri.ToString(),
                OutputCookies = e.Uri.ToString(),
                Html = e.Uri.ToString(),
            };

            DataModel.Copy(status);

            //MessageBox.Show(e.Uri.ToString());
        }

    }
}
